package com.karrysong.blog_springboot.service;

import com.karrysong.blog_springboot.entity.User;
import com.karrysong.blog_springboot.vo.Result;
import com.karrysong.blog_springboot.vo.UserVo;
import com.karrysong.blog_springboot.vo.params.LoginParam;
import com.karrysong.blog_springboot.vo.params.UserPage;
import com.karrysong.blog_springboot.vo.params.UserParam;

import javax.servlet.http.HttpSession;

/**
 * @ClassName: UserService
 * @Author: KarrySong
 * @Date: 2022/8/4 9:38
 * @Description:
 */
public interface UserService {

    User findUserById(Long userId);

    Result getUserInfoByToken(String token);

    Result login(LoginParam loginParam);

    User findUser(String account, String pwd);

    Result logout(String token);

    Result register(LoginParam loginParam);

    Result register(UserParam userParam);

    User findUserByAccount(String account);

    void save(User sysUser);

    User checkToken(String token);

    UserVo copy(User user);

    Result getUserList(UserPage userPage);

    Result changeUserStatus(Long id, Integer newStatus);

    Result deleteUser(Long id);

    Result update(UserParam userParam);
}
